﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SmartHotel.Model
{
    [Table("order")]//order 是数据库里的表名
    public class OrderModel
    {
        [Key]
        public int Id { get; set; }
        /// <summary>
        /// 订单编号  用雪花Id赋值
// 雪花id使用三步:  ①加载组件包 
//    <PackageReference Include = "Yitter.IdGenerator" Version="1.0.14" />
//②在启动文件中 配置雪花id组件   YitIdHelper.SetIdGenerator(new IdGeneratorOptions(0));
//③使用雪花id var snowid = YitIdHelper.NextId();
        /// 
        /// 
        /// </summary>
        public string OrderCode {  get; set; }
        /// <summary>
        /// 会员名称
        /// </summary>
        public string UserName {  get; set; }
        /// <summary>
        /// 下订单的时候 ,一般取DateTime.Now()
        /// </summary>
        public DateTime OrderTime { get; set; }
        /// <summary>
        /// 房间编号  点房间列表的按钮时传过来
        /// </summary>
        public int RoomId { get; set; }

        /// <summary>
        /// 入住的开始时间,用户自己从订单页面选择的时间
        /// </summary>
        public DateTime BeginTime { get; set; }
        /// <summary>
        /// 客户离开时间,用户下订单的时候从订单页面选择
        /// </summary>
        public DateTime EndTime { get; set; }
        /// <summary>
        /// 总价
        /// </summary>
        public decimal TotalPrice {  get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        public decimal  Price {  get; set; }
         
        public int RoomCount { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        public string Phone {  get; set; }
        /// <summary>
        /// 支付方式
        /// </summary>
        public string PaymentMethod {  get; set; }
        /// <summary>
        /// 人脸上传的图片路径
        /// </summary>
        public string ImgUrl {  get; set; }
        /// <summary>
        /// 删除状态
        /// </summary>
        public int State {  get; set; }
        /// <summary>
        /// 特殊需求
        /// </summary>
        public string Teshu {  get; set; }
        /// <summary>
        /// 入住人是否时本人
        /// </summary>
        public bool IsSame {  get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Note { get; set; }
        /// <summary>
        /// 房间名称
        /// </summary>
        public string RoomName { get; set; }
        /// <summary>
        /// 订单状态枚举
        /// </summary>
        public OrderStatusEnum orderStatusEnum { get; set; }




    }
}
